package com.superbytecode.cloud.web.transform.former;

import com.superbytecode.cloud.web.transform.annotation.Transform;
import lombok.NonNull;

/**
 * All rights Reserved, Designed By www.super-master.com
 *
 * @ProjectName: beacon-cloud
 * @Package: com.superbytecode.cloud.web.transform.former
 * @ClassName: ObjectTransformer
 * @Description: []
 * <p> </p>
 * @Author: [Lance Ting]
 * @Date: 2024/10/22 12:20
 * @Version: V1.0
 * @Copyright: 2024 www.super-master.com Inc. All rights reserved.
 * TODO: 注意,本文件Lance Ting所作,如果转载或使用请标明具体出处!
 **/
public interface ObjectTransformer<T> extends Transformer<T, Transform> {
    /**
     * 转换值
     *
     * @param originalValue 转换之前的原始值
     * @param transform     转换注解
     * @return 翻译后的值
     */
    @Override
    default String transform(@NonNull T originalValue, Transform transform) {
        return transform(originalValue);
    }

    /**
     * 转换值
     *
     * @param originalValue 原始值
     * @return 翻译后的值
     */
    String transform(@NonNull T originalValue);
}